<template>
	<view>
		<swiper :style="getSwiperStyle">
			<swiper-item  v-for="(pa,p) in getPages" :key="p" class="fast-nav d-flex flex-wrap">
				<view v-for="(indexnav,k) in pa" :key="k" class="span-5 text-center my-2">
					<image :src="indexnav.src"></image>
					<view>{{indexnav.text}}</view>
				</view>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		name: "fast-nav",
		data() {
			return {

			};
		},
		props:{
			getPages:{
				type:Array
			}
		},
		computed:{
			getSwiperStyle() {
				let obj = ''
				if (this.getPages[0]) {
					if (this.getPages[0].length <= 4) {
						obj = `height:150rpx`
					} else {
						obj = `height:350rpx`
					}
				}
				return obj;
			}
		}
	}
</script>

<style>

	.fast-nav image {
		width: 88rpx;
		height: 88rpx;
	}
</style>